"""k8sDashboard URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include, re_path

from dashboard import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.index, name='index'),
    re_path('^login/$', views.login, name='login'),
    re_path('^namespace_api/$', views.NamespaceApiView.as_view(), name='namespace_api'),
    re_path('^node_api/$', views.NodeApiView.as_view(), name='node_api'),
    re_path('^persisten_volumes_api/$', views.PersistenVolumeApiView.as_view(), name='persisten_volumes_api'),
    re_path('^deployment_api/$', views.DeploymentApiView.as_view(), name='deployment_api'),
    re_path('^deployment_details_api/$', views.DeploymentDetailsApiView.as_view(), name='deployment_details_api'),
    re_path('^daemonset_api/$', views.DaemonsetApiView.as_view(), name='daemonset_api'),
    re_path('^pod_api/$', views.PodApiView.as_view(), name='pod_api'),
    re_path('^container_api/$', views.ContainerApiView.as_view(), name='container_api'),
    # re_path('^ws/log$', views.ContainerLogsView.as_view(), name='ws_container_log'),
    re_path('^statefulset_api/$', views.StatefulsetApiView.as_view(), name='statefulset_api'),
    re_path('^service_api/$', views.ServiceApiView.as_view(), name='service_api'),
    re_path('^ingress_api/$', views.IngressApiView.as_view(), name='ingress_api'),
    re_path('^configmap_api/$', views.ConfigmapApiView.as_view(), name='configmap_api'),
    re_path('^secrets_api/$', views.SecretsApiView.as_view(), name='secrets_api'),
    re_path('^persisten_volumes_claim_api/$', views.PersistentVolumeClaimsApiView.as_view(),
            name='persisten_volumes_claim_api'),
    re_path('^export_resource_api/$', views.ExportResourceView.as_view(), name='export_resource_api'),
    re_path('^ace_edit/$', views.ace_edit, name='ace_edit'),
    re_path('^logout/$', views.logout, name='logout'),
    path('k8s/', include('k8s.urls')),
    path('storage/', include('storage.urls')),
    path('loadbalancer/', include('loadbalancer.urls')),
    path('workload/', include('workload.urls')),
]